package co.com.timer;

import javax.ejb.LocalBean;
import javax.ejb.Singleton;
import javax.ejb.Timer;

/**
 * Session Bean implementation class MyTimer
 */
@Singleton
@LocalBean
public class MyTimer implements MyTimerLocal {
	
	private int count = 0;

	@Override
	//@Schedule(second="*/5", minute="*", hour="*")
	public void doStuff() {
		System.out.printf("Han pasado ... %d segundos%n", count);
		count = count + 5;
	}

	//@Schedule(second="*/15", minute="*", hour="*")
	public void doStuffParam(Timer timer) {
		System.out.println("Timer info: " + timer);
	}
}